package ExerciseThree;
/*
 * 1、创建一个Customer 类，名为Jane simth;他的id号为：1000；他的账户里有2000元
 *    年利率为：1.23%
 * 2、行为：
 *    2.1 存入100，再存入960，最后取出2000，显示余额不足。
 *    2.2 打印Jane simth的信息。
 * 
 */
public class AccountTest {

	public static void main(String[] args) {

		//创建对象
		Customer cust = new Customer("jane","Smith");
		
		Account acct = new Account(1000,2000,0.0123);
		
		cust.setAccount(acct);
		
		cust.getAccount().deposit(100);

		cust.getAccount().withdraw(960);
		
		cust.getAccount().withdraw(2000);
		
		System.out.println("Customer["+cust.getLastName()+","+cust.getFirstName()+"] has a account: id is "+cust.getAccount().getId()+",annualInterestRate is "+
		                   cust.getAccount().getAnnualinterestrate()*100+"%,balance is "+cust.getAccount().getBalance());
	}

}
